<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>用户登陆</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
    <link href="../bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
    <style type="text/css">
    .container{
    width:300px;
    
    
    
    }
    
    </style>
    <script type="text/javascript" src="../jquery/jquery-1.6.1.js"></script>
    <script type="text/javascript">
$(function(){
	$("#ok").click(function(){
	var username=$("#username").val();
	var password=$("#password").val();
	var password2=$("#password2").val();
	if(username==""){
	 $("#msg").html("请输入用户名");
	 $("#usename").focus();
	}
	else if(password==""){
	 $("#msg").html("请输入密码 ");
	  $("#password").focus();
	}
	else if(password2==""){
	 $("#msg").html("请输入确认密码 ");
	 $("#password").focus();
	}
	else if(password!=password2){
	
	$("#msg").html("输入的密码和确认密码不一致 ");
	$("#password").focus();
	
	}
	else if (username.length<6||username.length>15){
	$("#msg").html("用户名填写不正确，请在5到15个字符之间");
	 $("#usename").focus();
	}
	else if (password.length<6||password.length>15){
	$("#msg").html("用户名填写不正确，请在5到15个字符之间");
	 $("#password").focus();
	}
else {
      $("#form").submit()
}
	
	})
})


</script>
  </head>
  <body>
    <div class="container">
    <form class="form-signin" id="form" action="../action/websiteAction/registerAction.jsp" method="post">
<h2 class="form-signin-heading">请注册</h2>
<input class="input-block-level" type="text" id="username" name="username" placeholder="用户名" >
<input class="input-block-level" type="password" id="password" name="password" placeholder="密码">
<input class="input-block-level" type="password" id="password2" name="password2" placeholder="确认密码密码">
<button class="btn btn-large btn-primary" type="button" id="ok">确定</button>&nbsp;&nbsp;&nbsp;<button class="btn btn-large btn-primary" type="reset">重置</button>
</form>
    
  <center> <span id="msg" style="color:red;font-size:20px;"></span></center>
    </div>
    <script src="../bootstrap/js/bootstrap.js"></script>
    <script src="../bootstrap/js/bootstrap.min.js"></script>
  </body>
</html>
